package model.characters.weapons;

import java.awt.Point;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.List;

import model.ComponentTypeEnum;
import model.LayerEnum;
import model.ModelComponent;


public class MT40 implements Weapon, ModelComponent{
	
	private Rectangle region;
	private List<Handable> actions;
	private ComponentTypeEnum type;
	
	public MT40() {
		actions = new ArrayList<Handable>();
		region = new Rectangle(50, 10);
		type = ComponentTypeEnum.WEAPON_MT40;
	}
	
	
	@Override
	public Rectangle getRegion() {
		return region;
	}
	@Override
	public void use(Integer direction) {

		actions.add(new MT40Shot(new Point(region.x+(direction>0?region.width:-5),region.y),direction));
	
	}
	
	@Override
	public List<Handable> getActions() {
		return actions;
	}

	@Override
	public void removeAction(Handable action) {
		actions.remove(action);		
	}

	@Override
	public LayerEnum getLayer() {
		// TODO chumbei primeira layer, necessario rever isso? rs
		return LayerEnum.LAYER_1;
	}


	@Override
	public void reload() {
		// TODO Auto-generated method stub
		
	}


	@Override
	public ComponentTypeEnum getType() {
		return type;
	}

	@Override
	public boolean isUsing() {
		// TODO Auto-generated method stub
		return false;
	}

}
